<?php
namespace app\controllers\api\post;

use app\libs\LibUser;
use app\libs\Sys;

// 是否可编辑文章
class CanController extends \fate\web\PureController {

    public function run() {
        // 是否登录
        $uid = LibUser::getLoginUid();
        if('' === $uid) {
            $this->ajaxReturn(null, 200001);
            exit;
        }

        if(Sys::canPost($uid)) {
            $this->ajaxReturn(null);
            exit;
        }

        $this->ajaxReturn(null, 200002);
    }

}
